/*
 * BoundedRangeModel.java  0.4.0 / Oct 25, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
package com.cute4j.swing;

import com.cute4j.swing.events.ChangeListener;

/**
 * Bounded Range Model. (Model for ProgressBar and Slider)
 *
 * @author Slobodan Vrkacevic
 * @version 0.4.0
 */
public interface BoundedRangeModel {

  /**
   * Returns the current value for the model.
   *
   * @return The current value for the model.
   */
  public int getValue();

  /**
   * Sets the current value for the model.
   *
   * @param value the value
   */
  public void setValue(int value);

  /**
   * Returns the minimum value for the model.
   *
   * @return the minimum value for the model
   */
  public int getMinimum();

  /**
   * Sets the minimum value for the model.
   *
   * @param minimum the minimum value
   */
  public void setMinimum(int minimum);

  /**
   * Returns the maximum value for the model.
   *
   * @return the maximum value for the model
   */
  public int getMaximum();

  /**
   * Sets the maximum value for the model.
   *
   * @param maximum the maximum value
   */
  public void setMaximum(int maximum);

  /**
   * Returns the current extent.
   *
   * @return the extent
   */
  public int getExtent();

  /**
   * Sets the current extent.
   *
   * @param extent the extent
   */
  public void setExtent(int extent);

  /**
   * Returns the value of the <tt>valueIsAdjusting</tt> property.
   *
   * @return the value of the <tt>valueIsAdjusting</tt> property
   */
  public boolean getValueIsAdjusting();

  /**
   * Sets the value of the <tt>valueIsAdjusting</tt> property.
   *
   * @param adjusting the value of the <tt>valueIsAdjusting</tt> property
   */
  public void setValueIsAdjusting(boolean adjusting);

  /**
   * Sets all the properties for the model.
   *
   * @param value the value
   * @param extent the extent
   * @param minimum the minimum value
   * @param maximum the maximum value
   * @param adjusting the adjusting flag
   */
  public void setRangeProperties(int value, int extent, int minimum,
                                 int maximum, boolean adjusting);

  /**
   * Adds change listener.
   *
   * @param listener the change listener
   */
  public void addChangeListener(ChangeListener listener);

  /**
   * Removes change listener.
   *
   * @param listener the change listener
   */
  public void removeChangeListener(ChangeListener listener);

}
